pip install esptool -i https://pypi.tuna.tsinghua.edu.cn/simple

cd /d %~dp0

set  binfile=wifiTouch_20241211.ino.bin

esptool -b 115200 erase_flash || esptool.py -b 115200 erase_flash
esptool --chip esp8266 -b 115200 --after soft_reset write_flash 0x00000 %binfile% || esptool.py --chip esp8266 -b 115200 --after soft_reset write_flash 0x00000 %binfile%

pause